package drafts

import (
	"errors"
	draftsDto "news_for_deepseek_interface/dto/admin/drafts"
	"news_for_deepseek_interface/model"
)

func Delete(params draftsDto.DeleteRequest) error {

	db := model.GetInstance().GetDB()
	if err := db.Where("id in (?)", params.Id).Delete(&model.NewsModel{}).Error; err != nil {
		return errors.New("新闻不存在")
	}

	return nil
}
